<!--
 * @Author: your name
 * @Date: 2021-09-23 14:12:52
 * @LastEditTime: 2021-09-23 15:36:32
 * @LastEditors: Please set LastEditors
 * @Description: 提示窗口
 * @FilePath: \uniapp-cil\src\components\x-tips-window\x-tips-window.vue
-->
<template>
  <view>
    <u-mask :show="show" @click="closeWin">
      <view class="w_100 h_100 u-flex u-row-center">
        <view class="w_75 p_b_35 p_row_45 bg_w zhu_color">
          <view class="p_col_55 u-font-32 f_w_700 u-text-center">{{ title }}</view>
          <view class="content u-font-28 f_w_500">
            <slot name="content"></slot>
          </view>
          <view class="foot_btn u-font-30 f_w_500 u-flex u-flex-col u-m-t-55">
            <view v-if="showConfirmBtn" class="w_80">
              <u-button shape="circle" type="primary" @click.stop="confirm">{{
                confirmBtnText
              }}</u-button>
            </view>
            <view v-if="showBackBtn" class="m_col_20 w_80" >
              <u-button :plain="true" shape="circle" @click.stop="back">{{
                backBtnText
              }}</u-button>
            </view>
          </view>
        </view>
      </view>
    </u-mask>
  </view>
</template>

<script>
export default {
  name: "x-tips-window",
  props: {
    showConfirmBtn: {
      type: Boolean,
      default: true,
    },
    show: {
      type: Boolean,
      default: false,
    },
    title: {
      type: String,
      default: "提示",
    },
    confirmBtnText: {
      type: String,
      default: "知道了",
    },
    showBackBtn: {
      type: Boolean,
      default: false,
    },
    backBtnText: {
      type: String,
      default: "返回",
    },
  },
  data() {
    return {};
  },
  methods: {
    closeWin() {
      this.$emit("closeWin");
    },
    confirm() {
      this.$emit("confirm");
    },
    back() {
      this.$emit("back");
    },
  },
};
</script>

<style lang="scss" >

</style>
